<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>天禾汽车租赁系统-账户管理</title>
    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/common.css">
</head>
<body>
    <div class="wrap-padding-15">
        <span class="layui-breadcrumb">
          <a href="/" target="_top">首页</a>
          <a href="/user">账户管理</a>
          <a><cite>编辑</cite></a>
        </span>
        <div class="box-form">
            <form action="/user/update" method="post" class="layui-form">
                <input type="hidden" name="uid"  value="${user.uid}">
                <div class="layui-form-item">
                    <label class="layui-form-label">账户：</label>
                    <div class="layui-input-block">
                        <input type="text" name="username" value="${user.username}"  lay-verify="required" placeholder="请输入账户名称" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">昵称：</label>
                    <div class="layui-input-block">
                        <input type="text" name="nickname" value="${user.nickname}"  lay-verify="required" placeholder="请输入昵称" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">姓名：</label>
                    <div class="layui-input-block">
                        <input type="text" name="realname" value="${user.realname}"  lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">手机号：</label>
                    <div class="layui-input-block">
                        <input type="text" name="mobile"  value="${user.mobile}"  placeholder="请输入手机号" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">邮箱：</label>
                    <div class="layui-input-block">
                        <input type="text" name="email"  value="${user.email}"  placeholder="请输入邮箱" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">工号：</label>
                    <div class="layui-input-block">
                        <input type="text" name="personid" value="${user.personid}"  lay-verify="required" placeholder="请输入工号" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">租赁店：</label>
                    <div class="layui-input-block">
                        <input type="text" name="deptname" value="${user.deptname}"  lay-verify="required" placeholder="请输入租赁店" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">角色：</label>
                    <div class="layui-input-block">
                        <select name="rolecode"  lay-verify="required" lay-filter="type">
                            <c:forEach items="${roleList}" var="role">
                                <option value="${role.roleid}"  <c:if test="${role.roleid eq user.rolecode}">selected</c:if> >${role.rolename}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">账户状态：</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="userstate" value="1" title="启用" <c:if test="${user.userstate eq 1}">checked</c:if>>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formSubmit">保存</button>
                        <a href="/user"><button type="button" class="layui-btn layui-btn-primary">取消</button></a>

                    </div>
                </div>
            </form>
        </div>

    </div>


<script src="/static/plugins/jquery.js"></script>
<script src="/static/plugins/layui/layui.js"></script>
<script>
    layui.use('form',function () {
        var form = layui.form
    })
</script>
</body>
</html>